import http from '@/configs/request'

/**
 * 登录接口
 * @param {string} username 
 * @param {string} password 
 * @param {string} valid 
 * @param {string} uuid 
 * @returns 
 */
export function login (username, password, valid, uuid){
    return http.post({
        url: 'auth/login',
        method: 'post',
        data: {
            username,
            password,
            valid,
            uuid
        }
    })
}

/**
 * 
 * @returns 获取用户信息
 */
export function getUserInfo(){
    return http.get({
        url: 'auth/info',
        method: 'get'
    })
}

/**
 * 
 * @returns 获取验证图片
 */
export function getValidImg(){
    return http.get({
        url: 'auth/validImg',
        method: 'get'
    })
}

/**
 * 
 * @returns 退出登录
 */
export function logout(){
    return http.get({
        url: 'auth/logout',
        method: 'get'
    })
}
